package com.jihu.design.behavioral.chain.ext;

/**
 * @author jihu
 * @date 2021/10/14
 */
public class MainTest {

    public static void main(String[] args) {
        FilterChain chain = new FilterChain();

        chain.addFilter(new HttpFilter());
        chain.addFilter(new CharacterFilter());
        chain.addFilter(new EncodingFilter());

        chain.setTarget(new My());

        chain.doFilter(new Request("hello world!"),
                new Response("hello"), chain);

    }
}
